package org.goyo.main.domain.entity.sale;
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.goyo.main.domain.entity.BaseEntryObject;
import org.goyo.main.domain.entity.base.Material;

/**
 * 签收
 * @author Administrator
 *
 */
@Entity
public class SignIn extends BaseEntryObject implements Serializable {
	
	private static final long serialVersionUID = 1L;
	/**
	 * 商品
	 */
	@ManyToOne
	@JoinColumn(name="materialId")
	private Material material;
	
	/**
	 * 商品名称
	 */
	@Column
	private String materialName;
	/**
	 * 来源单据Id
	 */
	@Column
	private String resourceId;
	/**
	 * 来源单据分录Id
	 */
	@Column
	private String resourceEntryId;
	
	/**
	 * 签收数量
	 */
	@Column
	private double signInQty = 0;
	
	/**
	 * 签收人
	 */
	@Column
	private String  signInPerson;
	
	/**
	 * 签收日期
	 */
	@Column
	private String  signInDate;
	
	
	
	public Material getMaterial() {
		return material;
	}

	public void setMaterial(Material material) {
		if(material != null &&("".equals(material.getUuid()) || material.getUuid()==null))
			this.material = null;
		else
			this.material = material;	
	}

	public String getSignInPerson() {
		return signInPerson;
	}

	public void setSignInPerson(String signInPerson) {
		this.signInPerson = signInPerson;
	}

	public String getSignInDate() {
		return signInDate;
	}

	public void setSignInDate(String signInDate) {
		this.signInDate = signInDate;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	public String getResourceEntryId() {
		return resourceEntryId;
	}

	public void setResourceEntryId(String resourceEntryId) {
		this.resourceEntryId = resourceEntryId;
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public double getSignInQty() {
		return signInQty;
	}

	public void setSignInQty(double signInQty) {
		this.signInQty = signInQty;
	}
	
}
